﻿using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ConsoleApp1
{
    class Program
    {
        static void Main(string[] args)
        {
            Queue queue = new Queue();
            queue.Enqueue("明天你好");
            queue.Enqueue("今天你好");
            queue.Enqueue("昨天你好");
            queue.Enqueue(222);
            queue.Enqueue(666);

            //while (queue.Count!=0)
            //{
            //    Console.WriteLine(queue.Dequeue());
            //}

            var arr = queue.ToArray();
            foreach (var item in arr)
            {
                Console.WriteLine(item);
            }

            Console.WriteLine();

            var arr1 = queue.GetEnumerator();
            while (arr1.MoveNext())
            {
                Console.WriteLine(arr1.Current);
            }
        }
    }
}
